package com.yay.easter;

import java.util.Locale;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Typeface;


/**
 * Get Started!
 * @author yakovlev.yuriy@gmail.com
 * @author Dmitry Makeev
 */
public class L10N {
	private static String _font = "fonts/a.ttf";
	public static Typeface font;
	public static Locale locale;

	
	public static void init(Resources res) {
		initFont(res);
		Configuration conf = res.getConfiguration();
		if(!conf.locale.equals(locale)) {
			conf.locale = locale;
			res.updateConfiguration(conf, res.getDisplayMetrics());
		}
	}
	
	
	// PRIVATE METHODS
	
	private static void initFont(Resources res) {
		if(font == null) {
			font = Typeface.createFromAsset(res.getAssets(), _font);
		}
	}
	
}
